package com.humi.partner.front.util;

import java.io.IOException;

import com.alibaba.fastjson.JSONObject;
import com.fasterxml.jackson.core.JsonGenerator;
import com.fasterxml.jackson.databind.JsonSerializer;
import com.fasterxml.jackson.databind.SerializerProvider;
/**
 * 
 * <pre>
 * <b>Description:格式化JSON字符串【注解】</b> 
 *    
 * <b>Author:</b> Admin
 * <b>Date:</b> 2019年7月9日 下午2:07:56
 * </pre>
 */

public class StringToJSON extends JsonSerializer<String>{

	@Override
	public void serialize(String value, JsonGenerator gen, SerializerProvider serializers) throws IOException {
		gen.writeObject(JSONObject.parse(value));
	}

}
